package com.tianyi.sfzy1.mapper;

import com.tianyi.sfzy1.domain.Coursefavorite;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
* @author Lenovo
* @description 针对表【coursefavorite(课程收藏表)】的数据库操作Mapper
* @createDate 2025-01-02 11:46:53
* @Entity com.tianyi.sfzy1.domain.Coursefavorite
*/
@Mapper
public interface CoursefavoriteMapper {
    //删除
    int deleteByPrimaryKey(int favoriteId);


    //小程序删除收藏记录
    int deleteOne(int memberId,int courseId);

    // 新增
    int insert(Coursefavorite record);

    int insertSelective(Coursefavorite record);
    //根据id查询
    Coursefavorite selectByPrimaryKey(int favoriteId);

    int updateByPrimaryKeySelective(Coursefavorite record);
    //修改全部字段
    int updateByPrimaryKey(Coursefavorite record);
    //查询全部
    List<Coursefavorite> findAll();

    //小程序新增收藏
    int insertOne(int memberId,int courseId);

   //小程序用户和课程id查询
   Coursefavorite find(int memberId,int courseId);

}
